<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
		</style>
	</head>
	<body>
		<div class="div1" id="div1">我是div1</div>
		<div class="div1">我是div2</div>
		<div class="div2">我是div3</div>
		<p>我是p标签</p>
		<script type="text/javascript">
			// 新增的获取标签的方式 通过css 选择器 
			// querySelector() 获取第一个满足选择器的标签
			var div =document.querySelector("div");
			var div2 = document.querySelector(".div1")
			var div3 = document.querySelector("#div1")
			console.log(div)
			console.log(div2)
			console.log(div3)
			
			
			// querySelectorAll() 以集合的形式获取标签
			var p = document.querySelectorAll("p")[0]
			var div22 = document.querySelectorAll(".div1")[1]
			console.log(p)
			console.log(div22)
		</script>
	</body>
</html>
